package demo.blog.service.impl;

import demo.blog.dao.UserMapper;
import demo.blog.model.User;
import demo.blog.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    @Override
    public User getUserByEmail(String email) {
        return userMapper.selectByEmail(email);
    }

    @Override
    public int addUser(User user) {
        return userMapper.insertUser(user);
    }

}
